package com.rp.user.controller;

import com.rp.news.common.Result;
import com.rp.news.util.RedisOperator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private RedisOperator redis;

    @GetMapping("test/redis")
    public Result get(){
        redis.set("test","zhangsan");
        return Result.ok(redis.get("test"));
    }
}
